package com.loveto.common;

import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class CommonUtils {

	public static boolean isNetworkAvailabe(ConnectivityManager connect) {
		if (connect.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState() == NetworkInfo.State.CONNECTED ||
				connect.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState() == NetworkInfo.State.CONNECTED) {
			return true;
		} else {
			return false;
		}
	}

}
